<?php
/**
 * The SIDN EPP Result object
 *
 * <Insert random introduction here...>
 *
 *
 *
 * @author Ralph de Boom <php5-sidnepp@mijndomein.nl>
 * @author Peter Keizer <php5-sidnepp@mijndomein.nl>
 * @license http://www.gnu.org/licenses/gpl-3.0.txt GNU Public License v3
 * @copyright http://www.mijndomein.nl/
 * @version 0.5
 * @link http://php5-sidnepp.svn.sourceforge.net/viewvc/php5-sidnepp/trunk/dev/docs/index.html
 * @see http://php5-sidnepp.svn.sourceforge.net/viewvc/php5-sidnepp/trunk/dev/docs/php5-sidnepp/SidnEppResult.html
 * @package php5-sidnepp
 */
class SidnEppResult
{
	/**
	 * Status Constants
	 */
	const SUCCESS 						= 'success';
	const ERROR 						= 'error';
	const REGISTRAR_AVAILABLE 			= 'registrar_available';
	const REGISTRAR_UNAVAILABLE 		= 'registrar_unavailable';
	const DOMAIN_AVAILABLE 				= 'domain_available';
	const DOMAIN_UNAVAILABLE 			= 'domain_unavailable';
	const NAMESERVER_AVAILABLE          = 'nameserver_available';
	const NAMESERVER_UNAVAILABLE        = 'nameserver_unavailable';
	const CONTACT_AVAILABLE             = 'contact_available';
	const CONTACT_UNAVAILABLE           = 'contact_unavailable';

	//const WAIT_FOR_EVENT 				= 'wait_for_event';
	//const AUTHORIZATIONCODE_REQUIRED 	= 'authorizationcode_required';
	//const TRANSFERDOCUMENT_REQUIRED 	= 'transferdocument_required';

	private $message;
	private $status;
	private $code;
	private $notifyUser;

	/**
	 * @param string $status
	 * @param string $message
	 */
	public function __construct($status, $message = null)
	{
		$this->setStatus($status);
		if ($message)
		{
			$this->setStatusMessage($message);
		}
	}

	function notifyUser($bool = null)
	{
		if (isset($bool))
		{
			$this->notifyUser = $bool;
		}
		else
		{
			return $this->notifyUser;
		}
	}

	/**
	 * This sets the status
	 *
	 * @param string $status
	 */
	public function setStatus($status)
	{
		$this->status = $status;
	}

	/**
	 * Get the status
	 * @return string
	 */
	public function getStatus()
	{
		return $this->status;
	}

	/**
	 * Sets the message
	 * @param string $message
	 */
	public function setStatusMessage($message)
	{
		$this->message = $message;

	}

	/**
	 * Get the message
	 * @return status
	 */
	public function getStatusMessage()
	{
		return $this->message;
	}

	/**
	 * Set the code
	 * @param integer $code
	 */
	public function setCode($code)
	{
		$this->code = $code;
	}

	/**
	 * Get the code
	 * @return integer
	 */
	public function getCode()
	{
		return $this->code;
	}

}
